<html>
<head>
	<title>Partage Y-Nov - Accueil</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="style.css">
	<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
	<link rel="shortcut icon" href="../favicon.ico">
	<link rel="stylesheet" type="text/css" href="css/normalize.css" />
	<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.2.0/css/font-awesome.min.css" />
	<link rel="stylesheet" type="text/css" href="css/content.css" />
	<script src="js/modernizr.custom.js"></script>
</head>
<body>
	<div id="container">
		<div class="menu-wrap">
			<nav class="menu">
				<!--<div class="profile"><img src="img/user1.png" alt="Matthew Greenberg"/><span>Matthew Greenberg</span></div> -->
				<div class="icon-list">
					<a href="index.php"><i class="fa fa-home"></i><span>Accueil</span></a>
					<a href="bts_sio.php"><i class="fa fa-file-pdf-o"></i><span>BTS SIO</span></a>
					<a href="#"><i class="fa fa-file-pdf-o"></i><span>Bachelor</span></a>
					<a href="#"><i class="fa fa-file-pdf-o"></i><span>Expert</span></a>
				</div>
			</nav>
			<button class="close-button" id="close-button">Close Menu</button>
		</div>
		<button class="menu-button" id="open-button">Open Menu</button>
		<div class="content-wrap">
			<header>
				<h1>Site de partage Y-nov Lyon</h1>
				<h2>Bienvenue</h2>
			</header>
			<h3>Partagez vos cours à tous vos camarades</h3>

			<section>
				<div class="mockup-content">
					<p>Connectez-vous!</p>
					<div class="morph-button morph-button-modal morph-button-modal-2 morph-button-fixed">
						<button type="button">Login</button>
						<div class="morph-content">
							<div>
								<div class="content-style-form content-style-form-1">
									<span class="icon icon-close">Close the dialog</span>
									<h2>Login</h2>
										<?php 
											session_start();
											include_once("constante.php");
											include_once("DataBase.php");
											
												if (isset($_SESSION['pseudo']))
												{
												echo'<a href="deconnexion.php"><input type="button" value="Déconnexion"></a>';
												}
												else
												{
												include("formulaire_connexion.php");	
												}	
										?>
									
								</div>
							</div>
						</div>
					</div><!-- morph-button -->
					<p class="joiner">ou</p>
					<div class="morph-button morph-button-modal morph-button-modal-3 morph-button-fixed">
						<button type="button">Inscription</button>
						<div class="morph-content">
							<div>
								<div class="content-style-form content-style-form-2">
									<span class="icon icon-close">Close the dialog</span>
									<h2>Inscription</h2>
									<?php 
									include("Formulaire_Inscription.php");		
									?>
								</div>
							</div>
						</div>
					</div><!-- morph-button -->
					<p>Pas encore de compte ? Vous pouvez vous en créer un!</p>
				</div><!-- /form-mockup -->
			</section>
		</div><!-- fin content-wrap -->
	</div><!-- fin container -->
	<script src="js/classie.js"></script>
	<script src="js/main.js"></script>
	<script src="js/uiMorphingButton_fixed.js"></script>
	<script>
			(function() {
				var docElem = window.document.documentElement, didScroll, scrollPosition;

				// trick to prevent scrolling when opening/closing button
				function noScrollFn() {
					window.scrollTo( scrollPosition ? scrollPosition.x : 0, scrollPosition ? scrollPosition.y : 0 );
				}

				function noScroll() {
					window.removeEventListener( 'scroll', scrollHandler );
					window.addEventListener( 'scroll', noScrollFn );
				}

				function scrollFn() {
					window.addEventListener( 'scroll', scrollHandler );
				}

				function canScroll() {
					window.removeEventListener( 'scroll', noScrollFn );
					scrollFn();
				}

				function scrollHandler() {
					if( !didScroll ) {
						didScroll = true;
						setTimeout( function() { scrollPage(); }, 60 );
					}
				};

				function scrollPage() {
					scrollPosition = { x : window.pageXOffset || docElem.scrollLeft, y : window.pageYOffset || docElem.scrollTop };
					didScroll = false;
				};

				scrollFn();

				[].slice.call( document.querySelectorAll( '.morph-button' ) ).forEach( function( bttn ) {
					new UIMorphingButton( bttn, {
						closeEl : '.icon-close',
						onBeforeOpen : function() {
							// don't allow to scroll
							noScroll();
						},
						onAfterOpen : function() {
							// can scroll again
							canScroll();
						},
						onBeforeClose : function() {
							// don't allow to scroll
							noScroll();
						},
						onAfterClose : function() {
							// can scroll again
							canScroll();
						}
					} );
				} );

				// for demo purposes only
				[].slice.call( document.querySelectorAll( 'form button' ) ).forEach( function( bttn ) { 
					bttn.addEventListener( 'click', function( ev ) { ev.preventDefault(); } );
				} );
			})();
		</script>
</body>
</html>